package com.wanlian.jpush.push.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.wanlian.common.JPushComUtil;


public class SmsMessage implements ICheckable {

	private String content;
	/**
	 * 单位为秒，不能超过24小时。设置为0，表示立即发送短信。该参数仅对android平台有效，iOS 和 Winphone平台则会立即发送短信
	 */
	@JsonProperty(value = "delay_time")
	private int delayTime;

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getDelayTime() {
		return delayTime;
	}

	public void setDelayTime(int delayTime) {
		this.delayTime = delayTime;
	}

	@Override
	public boolean checkIsAble() {
		if (content.isEmpty() || content == null || delayTime >= JPushComUtil.SMSMAXSENCODE) {
			return false;
		} else {
			if (content.length() >= 480) {
				return false;
			}
		}
		return true;
	}
}
